﻿using System;
using System.Web;
namespace Things.DALFactory
{
	/// <summary>
	/// »º´æ²Ù×÷Àà
	/// </summary>
	public class DataCache
	{
		/// <summary>
		/// »ñÈ¡µ±Ç°Ó¦ÓÃ³ÌÐòÖ¸¶¨CacheKeyµÄCacheÖµ
		/// </summary>
		/// <param name="CacheKey"></param>
		/// <returns></returns>
		public static object GetCache(string CacheKey)
		{
			System.Web.Caching.Cache objCache = HttpRuntime.Cache;
			return objCache[CacheKey];
		}

		/// <summary>
		/// ÉèÖÃµ±Ç°Ó¦ÓÃ³ÌÐòÖ¸¶¨CacheKeyµÄCacheÖµ
		/// </summary>
		/// <param name="CacheKey"></param>
		/// <param name="objObject"></param>
		public static void SetCache(string CacheKey, object objObject)
		{
			System.Web.Caching.Cache objCache = HttpRuntime.Cache;
			objCache.Insert(CacheKey, objObject);
		}
	}
}
